﻿package client;
import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;
import javax.swing.DropMode;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;


public class ResOrderListGUI extends JDialog {

	private JPanel contentPane;

	private int[]b;
    private int num;
    private int Kind;
/*	 public static void main(String[] args){
		 EventQueue.invokeLater(new Runnable(){
			 	 
		public void run() {
				try {
					ResOrderListGUI frame = new ResOrderListGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
	 
			
});
}*/
	
	/**
	 * Create the frame.
	 */
	public ResOrderListGUI(String str, int []a,int kind,int number) {
		num=number;
		Kind=kind;

		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 341, 523);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(58, 63, 221, 333);
		contentPane.add(scrollPane);
		
		//	String str= new String(".\n.\n.\n.\n.\n.\n我是\n");	 //传出菜
		b=a;	
		
		
		JEditorPane editorPane = new JEditorPane("test/plain",str);
		editorPane.setFont(new Font("华文行楷", Font.PLAIN, 18));
		scrollPane.setViewportView(editorPane);
		editorPane.setEditable(false);
		
		JButton btnNewButton = new JButton("\u7ED3\u8D26");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				dispose();
				ResGiveMoneyGUI giveMoney=new ResGiveMoneyGUI(b,Kind,num);
				giveMoney.setModal(true);

				giveMoney.setLocationRelativeTo(null);
				giveMoney.setVisible(true);
				
			}
		});
		btnNewButton.setBounds(133, 421, 93, 23);
		contentPane.add(btnNewButton);
		
		JLabel label = new JLabel("\u60A8\u7684\u83DC\u5DF2\u4E0A\u9F50\u8BF7\u6162\u7528\uFF1A");
		label.setFont(new Font("方正舒体", Font.BOLD, 18));
		label.setBounds(36, 21, 227, 23);
		contentPane.add(label);
		
		JLabel lblNewLabel = new JLabel("New label");
		lblNewLabel.setIcon(new ImageIcon("src/client/images/325_490_1237368343.jpg"));
		lblNewLabel.setBounds(0, 2, 325, 483);
		contentPane.add(lblNewLabel);
			


		

	}
}
